#pragma once
#include "base/Control.h"
#include "base/TrueTypeFont.h"

class TextInputBox : public Control
{
public:
    TextInputBox() {
    }

    void ParseXmlElement(class TiXmlElement* ele);
    bool SetAttribute(const char* attrName, const char* attrVal);
    void OnDraw();
    virtual void onMouseMove(int x, int y) {}
    virtual void onMouseButtonDown(int button, int x, int y) {
        SetCaretPos(x, y);
    }
    virtual void onMouseButtonUp(int button, int x, int y) {}
    virtual void onKeyDown(int key, bool bCtrl, bool bShift, bool bAlt);
    virtual void onKeyUp(int key);
    BlueprintScriptLibrary::Class* GetClass();
    VarBaseString content;
    bool IsCaps;
    EventHandler<Control, VarBaseString> textChanged;
};
RegisterBlueprintClass(TextInputBox)